// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

// 引入样式清空css
import './assets/reset.css'
//引入icon
import './assets/font/iconfont.css'

// 引入element-ul
import 'element-ui/lib/theme-chalk/index.css';
import elementUi from 'element-ui'
Vue.use(elementUi)

//引入axios
import axios from 'axios'
const server = axios.create({
  baseURL:'https://www.liulongbin.top:8888/api/private/v1',
  timeout:4000,
})
//设置请求拦截器
server.interceptors.request.use(config=>{
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
},err=>{
  return Promise.reject(err);
})
Vue.prototype.$axios = server





Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
